home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 27.zip / BS1 part 27 / PowerpokerPro4.3.adf / Devs / postscript_init.ps < prev    next >
Text File  |  1992-08-22  |  5KB  |  186 lines

  1. %!PS-Adobe-2.0
  2. %%
  3. %%Title: PostScript Printer Driver for the Amiga
  4. %%
  5. %%Author: Chris Nicotra, Integrated Systems, Inc.
  6. %%
  7. %%BeginProlog
  8.  
  9. %---------
  10. % Device Specific routines
  11. %---------
  12.  
  13. % Paper Trays (Customize this for specific printers)
  14. /letter {} def
  15. /legal  {} def
  16. /executive {} def
  17. /a4 {} def
  18. /b5 {} def
  19. /envelope_s {} def
  20. /envelope_l {} def
  21. /custom {} def
  22.  
  23. % Manual Paper Feed (Customize this for specific printers)
  24. /manual {} def
  25.  
  26. % Graphic Screen Types
  27. /line_scr  { {pop} setscreen } def
  28. /dot_scr   { 20 currentscreen 4 -2 roll pop 3 1 roll setscreen } bind def
  29. /vert_scr  { 40  0 line_scr } def
  30. /horiz_scr { 40 90 line_scr } def
  31. /diag_scr  { 40 45 line_scr } def
  32.  
  33. %---------
  34. % General functions
  35. %---------
  36.  
  37. % underline show string
  38. /U
  39. {
  40.     gsave 0 -3 rmoveto
  41.     dup stringwidth pop
  42.     dup 0 rlineto neg 0 rlineto stroke
  43.     grestore
  44. } bind def
  45.  
  46. % Backspace a string
  47. /BS { stringwidth pop neg 0 rmoveto } bind def
  48.  
  49. % Shadow show string
  50. /SS
  51. {
  52.     dup
  53.     gsave false charpath .5 setlinewidth stroke grestore
  54.     stringwidth pop 0 rmoveto
  55. } bind def
  56.  
  57. % Show
  58. /S {show} bind def
  59.  
  60. % Move
  61. /M {moveto} bind def
  62.  
  63. /YM {currentpoint pop exch moveto} bind def
  64.  
  65. %% Define the ReEncoding Procudure
  66. /reencodedict 5 dict def
  67. /ReEncode
  68. {
  69.     reencodedict begin
  70.     /newencoding exch def
  71.     /newfontname exch def
  72.     /basefontname exch def
  73.  
  74.     /basefontdict basefontname findfont def
  75.  
  76.     /newfont basefontdict maxlength dict def
  77.  
  78.     basefontdict
  79.     { exch dup dup /FID ne exch /Encoding ne and
  80.         { exch newfont 3 1 roll put }
  81.         { pop pop }
  82.         ifelse
  83.     } forall
  84.     newfont /FontName newfontname put
  85.     newfont /Encoding newencoding put
  86.     newfontname newfont definefont pop
  87.     end
  88. } def
  89.  
  90. %% Define the ISO encoding Vector
  91. /ISO
  92. [
  93.  /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
  94.  /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
  95.  /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
  96.  /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
  97.  /space /exclam /quotedbl /numbersign /dollar /percent /ampersand
  98.  /quoteright /parenleft /parenright /asterisk /plus /comma /minus /period
  99.  /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon
  100.  /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H
  101.  /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft
  102.  /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c
  103.  /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z
  104.  /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef
  105.  /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
  106.  /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /dotlessi /grave
  107.  /acute /circumflex /tilde /macron /breve /dotaccent /dieresis /.notdef
  108.  /ring /cedilla /.notdef /hungarumlaut /ogonek /caron /space /exclamdown
  109.  /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright
  110.  /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron
  111.  /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph
  112.  /periodcentered /cedilla /onesuperior /ordmasculine /guillemotright
  113.  /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute
  114.  /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute
  115.  /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth
  116.  /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply
  117.  /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn
  118.  /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae
  119.  /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute
  120.  /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex
  121.  /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex
  122.  /udieresis /yacute /thorn /ydieresis
  123. ] def
  124.  
  125. /FC {ISO ReEncode findfont exch dup 0.8 mul exch matrix scale makefont} bind def
  126.  
  127. /FE {ISO ReEncode findfont exch dup 1.2 mul exch matrix scale makefont} bind def
  128.  
  129. /FN {ISO ReEncode findfont exch scalefont} bind def
  130.  
  131. /L 0 def
  132. /T {dup dup currentpoint pop L sub dup dup cvi sub 3 1 roll cvi exch mod add
  133. sub 0 rmoveto} bind def
  134.  
  135.  
  136. %---------------
  137. % Routines used for doing bitmap graphics
  138. %---------------
  139. /s1 1 string def
  140. /gsh {currentfile s1 readhexstring pop 0 get} bind def
  141.  
  142. /rep
  143. {
  144.     /d exch def exch dup 3 1 roll add
  145.     dup 3 1 roll
  146.     1 sub 1 exch
  147.     {
  148.         picstr exch d put
  149.     } for
  150. } bind def
  151.  
  152. /run
  153. {
  154.     dup string /tmp exch def
  155.     currentfile tmp readhexstring pop pop
  156.     exch dup 3 1 roll add exch picstr exch tmp putinterval
  157. } bind def
  158.  
  159. /runlen
  160. {
  161.     picstr length
  162.     0
  163.     {
  164.         2 copy eq {pop pop exit} if
  165.         gsh
  166.         dup 0 eq {pop gsh gsh rep} {run} ifelse
  167.     } loop
  168. } bind def
  169.  
  170. /getcstr
  171. {
  172.     gsh
  173.     1 eq {runlen picstr} {currentfile picstr readhexstring pop} ifelse
  174. } bind def
  175.  
  176. /getcstr_r {picstr_r 0 getcstr putinterval} bind def
  177. /getcstr_g {picstr_g 0 getcstr putinterval} bind def
  178. /getcstr_b {picstr_b 0 getcstr putinterval} bind def
  179.  
  180. /getstr   {currentfile picstr   readhexstring pop} bind def
  181. /getstr_r {currentfile picstr_r readhexstring pop} bind def
  182. /getstr_g {currentfile picstr_g readhexstring pop} bind def
  183. /getstr_b {currentfile picstr_b readhexstring pop} bind def
  184.  
  185. %%EndProlog
  186.